export default function createSmsSendActions(phoneId, codeId, imgCodeServiceId){
    return [
        {
            componentId: phoneId || 'phone',
            actionType: 'validateFormItem',
            outputVar: 'phoneResult',
        },
        {
            componentId: codeId || 'code-phone',
            actionType: 'validateFormItem',
            outputVar: 'codeResult',
        },
        {
            actionType: 'reload',
            componentId: imgCodeServiceId || 'service-img-code-phone',
            expression: '${!(event.data.phoneResult.error || event.data.codeResult.error)}'
        },
        {
            //阻止后面动作，比如ajax和倒计时，使用preventDefault是不行的，后续的动作不设置event链中
            actionType: 'custom',
            script: "if (event.data.phoneResult.error || event.data.codeResult.error) {throw '阻止后面的事件动作';}",
        }
    ]
}